home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 2 / Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso / Pearls / disk / DiskMon / DisKey_3.0_Preview / Install.DisKey < prev    next >
Text File  |  1994-11-16  |  11KB  |  457 lines

  1. ;$VER: DisKey.Install 1.4 (16-11-94)
  2. ;
  3. ; $Id: Install.DisKey,v 21.1 1994/11/16 13:01:07 Angela Schmidt Exp $
  4. ;
  5. ;Dies ist das Installscript für DisKey!
  6.  
  7.  
  8. (set langnum
  9.     (askchoice
  10.         (prompt "")
  11.         (help @askchoice-help)
  12.         (choices
  13.             "Deutsch"
  14.             "English"
  15.             "Français"
  16.         )
  17.         (default
  18.             (if (patmatch @language "Deutsch")
  19.                 0
  20.                 (if (patmatch @language "English")
  21.                     1
  22.                     (if (patmatch @language "Français")
  23.                         2
  24.                         0
  25.                     )
  26.                     0
  27.                 )
  28.             )
  29.         )
  30.     )
  31. )
  32.  
  33. (if (= langnum 0) (set langstring "Deutsch"))
  34. (if (= langnum 1) (set langstring "English"))
  35. (if (= langnum 2) (set langstring "Français"))
  36.  
  37. ; Hier folgen die Strings, die für die deutsche Übersetzung benötigt
  38. ; werden. Bei Übersetzungen in andere Sprachen einfach den folgenden
  39. ; Block komplett kopieren und die Texte ändern. Die Steuerzeichen
  40. ; sollten unverändert bleiben! Wer irgendwo eine Zeile hinzufügen oder
  41. ; löschen möchte, muß dir Anzahl der "%s" entsprechend anpassen - für
  42. ; jede Zeile steht ein "%s".
  43.  
  44. (if (patmatch langstring "Deutsch")
  45.     (
  46.         (set answer_yes "Ja")
  47.         (set answer_no "Nein")
  48.         (set choose_diskey_directory
  49.             (
  50.                 "%s%s"
  51.                 "Bitte wählen Sie das Verzeichnis, in dem Sie DisKey installieren wollen! "
  52.                 "In diesem Verzeichnis wird automatisch ein Verzeichnis mit dem Namen \"DisKey_3.0\" angelegt!"
  53.             )
  54.         )
  55.         (set copy_nonlocale_strings
  56.             "Sollen auch die Übersetzungstabellen für Benutzer ohne locale.library kopiert werden?"
  57.         )
  58.         (set help_copy_nonlocale_strings
  59.             (
  60.                 "%s%s%s"
  61.                 "Diese Option ist sinnvoll, wenn Sie zwischendurch ohne locale.library - zum Beispiel mit OS 2.04 oder gar Kickstart 1.3 - arbeiten. "
  62.                 "Wenn Sie \"Nein\" wählen, wird sich DisKey dann nur noch Englisch mit Ihnen "
  63.                 "unterhalten. Falls Sie jedoch \"Ja\" anklicken, werden Sie auch bei fehlender locale.library mit Ihrer Lieblingssprache verwöhnt werden!"
  64.             )
  65.         )
  66.         (set select_languages
  67.             "Bitte wählen Sie die Sprachen, die Sie installieren möchten!"
  68.         )
  69.         (set select_fs_modules
  70.             "Bitte wählen Sie die externen Dateisystem-Module, die Sie installieren möchten!"
  71.         )
  72.         (set help_select_fs_modules
  73.             (
  74.                 "%s%s%s"
  75.                 "Bisher sind folgende Module verfügbar:\n\n"
  76.                 "rdskfs - Modul zum Bearbeiten der Rigid-Disk-Blöcke einer Festplatte\n"
  77.                 "cosyfs - Modul zum Bearbeiten einer mit CosyFS formatierten Festplatte\n"
  78.             )
  79.         )
  80.         (set ready_to_install_1
  81.             "Sind Sie bereit, DisKey V3.0 im Verzeichnis "
  82.         )
  83.         (set ready_to_install_2
  84.             " zu installieren?"
  85.         )
  86.         (set install_fsmodules
  87.             "Installiere Dateisystem-Module..."
  88.         )
  89.         (set install_languages
  90.             "Installiere Sprachen..."
  91.         )
  92.         (set copylib_patternlibrary
  93.             (
  94.                 "%s%s"
  95.                 "Die pattern.library wird u. a. zum Patternmatching benötigt - sie muß also nicht "
  96.                 "zwingend installiert werden!"
  97.             )
  98.         )
  99.         (set copylib_dislibrary
  100.             (
  101.                 "%s%s"
  102.                 "Die dis.library wird nur benötigt, falls Sie die Disassembler-Funktion von "
  103.                 "DisKey 3.0 benutzen möchten. Sie muß also nicht zwingend installiert werden!"
  104.             )
  105.         )
  106.         (set copylib_reqlibrary
  107.             (
  108.                 "%s%s"
  109.                 "Die req.library wird nur für den Color-Requester benötigt - sie muß also nicht "
  110.                 "zwingend installiert werden!"
  111.             )
  112.         )
  113.     )
  114. )
  115. (if (patmatch langstring "English")
  116.     (abort "English texts are not yet translated, sorry!")
  117. )
  118. (if (patmatch langstring "Français")
  119.     (abort "Français n'est pas encore traduiré, je regrette!")
  120. )
  121.  
  122. (set todir @default-dest)
  123. (set todir
  124.     (askdir
  125.         (prompt choose_diskey_directory)
  126.         (help @askdir-help)
  127.         (default todir)
  128.     )
  129. )
  130. (set @default-dest todir)
  131. (set newdir (tackon todir "DisKey_3.0"))
  132. (makedir newdir)
  133. (if (exists (cat "DisKey_3.0.info"))
  134.     (
  135.         (run ("copy \"DisKey_3.0.info\" TO \"" (tackon todir "DisKey_3.0.info") "\""))
  136.         (tooltype
  137.             (dest newdir)
  138.             (noposition)
  139.         )
  140.     )
  141.     (
  142.         (run ("copy SYS:System.info TO \"" (tackon todir "DisKey_3.0.info") "\""))
  143.         (tooltype
  144.             (dest newdir)
  145.             (noposition)
  146.         )
  147.     )
  148. )
  149.  
  150. (if (exists ("LOCALE:" (noreq)))
  151.     (
  152.         (set copynonlocale
  153.             (askbool
  154.                 (prompt copy_nonlocale_strings)
  155.                 (help help_copy_nonlocale_strings)
  156.                 (default 1)
  157.                 (choices answer_yes answer_no)
  158.             )
  159.         )
  160.     )
  161.     (set copynonlocale 1)
  162. )
  163.  
  164. (set numlangs 1)
  165. (set lang_1 "English")
  166. (foreach
  167.     "DisKey_3.0/Catalogs"
  168.     "#?"
  169.     (
  170.         (set numlangs (+ numlangs 1))
  171.         (if (= numlangs 2)
  172.             (set lang_2 @each-name)
  173.         )
  174.         (if (= numlangs 3)
  175.             (set lang_3 @each-name)
  176.         )
  177.         (if (= numlangs 4)
  178.             (set lang_4 @each-name)
  179.         )
  180.         (if (= numlangs 5)
  181.             (set lang_5 @each-name)
  182.         )
  183.         (if (= numlangs 6)
  184.             (set lang_6 @each-name)
  185.         )
  186.         (if (= numlangs 7)
  187.             (set lang_7 @each-name)
  188.         )
  189.         (if (= numlangs 8)
  190.             (set lang_8 @each-name)
  191.         )
  192.         (if (= numlangs 9)
  193.             (set lang_9 @each-name)
  194.         )
  195.         (if (= numlangs 10)
  196.             (set lang_10 @each-name)
  197.         )
  198.     )
  199. )
  200.  
  201. (set language_bits
  202.     (askoptions
  203.         (prompt select_languages)
  204.         (help @askoptions-help)
  205.         (if (= numlangs 1)
  206.             (choices lang_1)
  207.         )
  208.         (if (= numlangs 2)
  209.             (choices lang_1 lang_2)
  210.         )
  211.         (if (= numlangs 3)
  212.             (choices lang_1 lang_2 lang_3)
  213.         )
  214.         (if (= numlangs 4)
  215.             (choices lang_1 lang_2 lang_3 lang_4)
  216.         )
  217.         (if (= numlangs 5)
  218.             (choices lang_1 lang_2 lang_3 lang_4 lang_5)
  219.         )
  220.         (if (= numlangs 6)
  221.             (choices lang_1 lang_2 lang_3 lang_4 lang_5 lang_6)
  222.         )
  223.         (if (= numlangs 7)
  224.             (choices lang_1 lang_2 lang_3 lang_4 lang_5 lang_6 lang_7)
  225.         )
  226.         (if (= numlangs 8)
  227.             (choices lang_1 lang_2 lang_3 lang_4 lang_5 lang_6 lang_7 lang_8)
  228.         )
  229.         (if (= numlangs 9)
  230.             (choices lang_1 lang_2 lang_3 lang_4 lang_5 lang_6 lang_7 lang_8 lang_9)
  231.         )
  232.         (if (= numlangs 10)
  233.             (choices lang_1 lang_2 lang_3 lang_4 lang_5 lang_6 lang_7 lang_8 lang_9 lang_10)
  234.         )
  235.         (default -1)
  236.     )
  237. )
  238.  
  239. (set numfs 0)
  240. (foreach
  241.     "DisKey_3.0/FileSystem"
  242.     "#?.dkfs"
  243.     (
  244.         (set numfs (+ numfs 1))
  245.         (if (= numfs 1)
  246.             (set fs_1 (substr @each-name 0 (- (strlen @each-name) 5)))
  247.         )
  248.         (if (= numfs 2)
  249.             (set fs_2 (substr @each-name 0 (- (strlen @each-name) 5)))
  250.         )
  251.         (if (= numfs 3)
  252.             (set fs_3 (substr @each-name 0 (- (strlen @each-name) 5)))
  253.         )
  254.         (if (= numfs 4)
  255.             (set fs_4 (substr @each-name 0 (- (strlen @each-name) 5)))
  256.         )
  257.         (if (= numfs 5)
  258.             (set fs_5 (substr @each-name 0 (- (strlen @each-name) 5)))
  259.         )
  260.         (if (= numfs 6)
  261.             (set fs_6 (substr @each-name 0 (- (strlen @each-name) 5)))
  262.         )
  263.         (if (= numfs 7)
  264.             (set fs_7 (substr @each-name 0 (- (strlen @each-name) 5)))
  265.         )
  266.         (if (= numfs 8)
  267.             (set fs_8 (substr @each-name 0 (- (strlen @each-name) 5)))
  268.         )
  269.         (if (= numfs 9)
  270.             (set fs_9 (substr @each-name 0 (- (strlen @each-name) 5)))
  271.         )
  272.         (if (= numfs 10)
  273.             (set fs_10 (substr @each-name 0 (- (strlen @each-name) 5)))
  274.         )
  275.     )
  276. )
  277.  
  278. (set fsmodule_bits
  279.     (askoptions
  280.         (prompt select_fs_modules)
  281.         (help help_select_fs_modules "\n\n" @askoptions-help)
  282.         (if (= numfs 1)
  283.             (choices fs_1)
  284.         )
  285.         (if (= numfs 2)
  286.             (choices fs_1 fs_2)
  287.         )
  288.         (if (= numfs 3)
  289.             (choices fs_1 fs_2 fs_3)
  290.         )
  291.         (if (= numfs 4)
  292.             (choices fs_1 fs_2 fs_3 fs_4)
  293.         )
  294.         (if (= numfs 5)
  295.             (choices fs_1 fs_2 fs_3 fs_4 fs_5)
  296.         )
  297.         (if (= numfs 6)
  298.             (choices fs_1 fs_2 fs_3 fs_4 fs_5 fs_6)
  299.         )
  300.         (if (= numfs 7)
  301.             (choices fs_1 fs_2 fs_3 fs_4 fs_5 fs_6 fs_7)
  302.         )
  303.         (if (= numfs 8)
  304.             (choices fs_1 fs_2 fs_3 fs_4 fs_5 fs_6 fs_7 fs_8)
  305.         )
  306.         (if (= numfs 9)
  307.             (choices fs_1 fs_2 fs_3 fs_4 fs_5 fs_6 fs_7 fs_8 fs_9)
  308.         )
  309.         (if (= numfs 10)
  310.             (choices fs_1 fs_2 fs_3 fs_4 fs_5 fs_6 fs_7 fs_8 fs_9 fs_10)
  311.         )
  312.         (default -1)
  313.     )
  314. )
  315.  
  316. (run ("protect %s rwed" (tackon newdir "DisKey")))
  317. (run ("protect %s rwed" (tackon newdir "DisKey.info")))
  318. (run ("protect %s rwed" (tackon newdir "DisKey.key")))
  319. (run ("protect %s rwed" (tackon newdir "DisKeyStartupMacro.dkm")))
  320. (run ("protect %s rwed" (tackon newdir "cmdshell.dk")))
  321. (run ("protect %s rwed" (tackon newdir "DK")))
  322. (run ("protect %s rwed" (tackon newdir "DK.info")))
  323. (run ("protect %s rwed" (tackon newdir "DisKeyDebug")))
  324. (run ("protect %s rwed" (tackon newdir "Inhibit")))
  325. (copyfiles
  326.     (prompt ready_to_install_1 todir ready_to_install_2)
  327.     (source "DisKey_3.0")
  328.     (pattern "(DisKey|DisKey.info|DisKey.key|DisKeyStartupMacro.dkm|cmdshell.dk|DK|DK.info|DisKeyDebug|Inhibit)")
  329.     (dest newdir)
  330.     (infos)
  331.     (optional nofail force)
  332. )
  333.  
  334. (if (NOT (= fsmodule_bits 0))
  335.     (
  336.         (working
  337.             install_fsmodules
  338.         )
  339.         (set fstmpbit 0)
  340.         (foreach
  341.             "DisKey_3.0/FileSystem"
  342.             "#?.dkfs"
  343.             (
  344.                 (if (IN fsmodule_bits fstmpbit)
  345.                     (
  346.                         (run ("protect %s rwed" (tackon (tackon newdir "FileSystem") @each-name)))
  347.                         (copyfiles
  348.                             (source (tackon "DisKey_3.0/FileSystem" @each-name))
  349.                             (dest (tackon newdir "FileSystem"))
  350.                             (optional nofail force)
  351.                         )
  352.                     )
  353.                 )
  354.                 (set fstmpbit (+ fstmpbit 1))
  355.             )
  356.         )
  357.     )
  358. )
  359.  
  360. (if (NOT (= (BITAND -2 language_bits) 0))
  361.     (
  362.         (working
  363.             install_languages
  364.         )
  365.         (set langtmpbit 1)
  366.         (if (NOT (exists (tackon newdir "Catalogs")))
  367.             (makedir (tackon newdir "Catalogs"))
  368.         )
  369.         (foreach
  370.             "DisKey_3.0/Catalogs"
  371.             "#?"
  372.             (
  373.                 (if (IN language_bits langtmpbit)
  374.                     (
  375.                         (set thislanguage @each-name)
  376.  
  377.                         (run ("protect %s rwed" (tackon (tackon (tackon newdir "Catalogs") thislanguage) "DisKey.catalog")))
  378.                         (copyfiles
  379.                             (source (tackon (tackon "DisKey_3.0/Catalogs" thislanguage) "DisKey.catalog"))
  380.                             (dest (tackon (tackon newdir "Catalogs") thislanguage))
  381.                             (optional nofail force)
  382.                         )
  383.                         (run ("protect %s rwed" (tackon (tackon (tackon newdir "Catalogs") thislanguage) "DisKey-AllFS.catalog")))
  384.                         (copyfiles
  385.                             (source (tackon (tackon "DisKey_3.0/Catalogs" thislanguage) "DisKey-AllFS.catalog"))
  386.                             (dest (tackon (tackon newdir "Catalogs") thislanguage))
  387.                             (optional nofail force)
  388.                         )
  389.                         (run ("protect %s rwed" (tackon (tackon (tackon newdir "Catalogs") thislanguage) "DisKey-KickFS.catalog")))
  390.                         (copyfiles
  391.                             (source (tackon (tackon "DisKey_3.0/Catalogs" thislanguage) "DisKey-KickFS.catalog"))
  392.                             (dest (tackon (tackon newdir "Catalogs") thislanguage))
  393.                             (optional nofail force)
  394.                         )
  395.                         (run ("protect %s rwed" (tackon (tackon (tackon newdir "Catalogs") thislanguage) "DisKey-AmigaFS.catalog")))
  396.                         (copyfiles
  397.                             (source (tackon (tackon "DisKey_3.0/Catalogs" thislanguage) "DisKey-AmigaFS.catalog"))
  398.                             (dest (tackon (tackon newdir "Catalogs") thislanguage))
  399.                             (optional nofail force)
  400.                         )
  401.  
  402.                         (set fstmpbit 0)
  403.                         (foreach
  404.                             "DisKey_3.0/FileSystem"
  405.                             "#?.dkfs"
  406.                             (
  407.                                 (if (IN fsmodule_bits fstmpbit)
  408.                                     (    ; *** FOLGENDE ZEILE MUSS NOCH RAUS, WENN ALLE CATALOGS EXISTIEREN!!!
  409.                                         (if (exists ((tackon (tackon "DisKey_3.0/Catalogs" thislanguage) ("DisKey-%s.catalog" (substr @each-name 0 (- (strlen @each-name) 5))))))
  410.                                             (run ("protect %s rwed" (tackon (tackon newdir "Catalogs") thislanguage)))
  411.                                             (copyfiles
  412.                                                 (source (tackon (tackon "DisKey_3.0/Catalogs" thislanguage) ("DisKey-%s.catalog" (substr @each-name 0 (- (strlen @each-name) 5)))))
  413.                                                 (dest (tackon (tackon newdir "Catalogs") thislanguage))
  414.                                                 (optional nofail force)
  415.                                             )
  416.                                         )
  417.                                     )
  418.                                 )
  419.                                 (set fstmpbit (+ fstmpbit 1))
  420.                             )
  421.                         )
  422.  
  423.                     )
  424.                 )
  425.                 (set langtmpbit (+ langtmpbit 1))
  426.             )
  427.         )
  428.     )
  429. )
  430.  
  431. (copylib
  432.     (prompt copylib_patternlibrary)
  433.     (help @copylib-help)
  434.     (source "DisKey_3.0/Libs/pattern.library")
  435.     (dest "LIBS:")
  436.     (optional nofail)
  437.     (confirm)
  438. )
  439.  
  440. (copylib
  441.     (prompt copylib_dislibrary)
  442.     (help @copylib-help)
  443.     (source "DisKey_3.0/Libs/dis.library")
  444.     (dest "LIBS:")
  445.     (optional nofail)
  446.     (confirm)
  447. )
  448.  
  449. (copylib
  450.     (prompt copylib_reqlibrary)
  451.     (help @copylib-help)
  452.     (source "DisKey_3.0/Libs/req.library")
  453.     (dest "LIBS:")
  454.     (optional nofail)
  455.     (confirm)
  456. )
  457.